package cn.iocoder.an.module.business.dal.mysql.auditlevel;

import java.util.*;

import cn.iocoder.an.framework.common.pojo.PageResult;
import cn.iocoder.an.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.an.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.an.module.business.dal.dataobject.auditlevel.AuditLevelDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.an.module.business.controller.admin.auditlevel.vo.*;

/**
 * 审核等级 Mapper
 *
 * @author 超级管理员
 */
@Mapper
public interface AuditLevelMapper extends BaseMapperX<AuditLevelDO> {

    default PageResult<AuditLevelDO> selectPage(AuditLevelPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<AuditLevelDO>()
                .likeIfPresent(AuditLevelDO::getLevelName, reqVO.getLevelName())
                .eqIfPresent(AuditLevelDO::getDescription, reqVO.getDescription())
                .eqIfPresent(AuditLevelDO::getConfigId, reqVO.getConfigId())
                .betweenIfPresent(AuditLevelDO::getCreateTime, reqVO.getCreateTime())
                .orderByAsc(AuditLevelDO::getId));
    }

}